<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>部署应用</title>
    <link href="../../../../../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../../../../lib/ui/js/plugins/datepicker/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="../../../../../content/pc/sysmgt/unitmanage/layui/css/layui.css">
    <link rel="stylesheet" href="../../../../../content/pc/sysmgt/unitmanage/css/bushu.css">
</head>
<body>
<div class="main">
</div>
<div class="body">
    <section class="table-box">
        <section class="table-box-body">
            <main class="table_cont">
                <div class="table_cont_inner">
                    <div class="table-header">
                        <a class="table-header-back"><i class="table-icon table-icon-btnback" role="img"></i></a>
                        <h2 class="table-h2">部署应用</h2>
                    </div>
                    <div class="table-bs-body">
                        <div class="table-bs-box">
                            <div class="table-bs-card">
                                <div class="table-card-body">
                                    <div class="table-card-cont">
                                        <div class="table-justify-grid mt-2n">
                                            <div class="table-justify-grid-cont">
                                                <div class="table-step">
                                                    <div class="table-step-item is-current" id="table-step-item-1">
                                                        <div class="table-step-num">1</div>
                                                        <div class="table-step-cont">
                                                            <div class="table-step-tit">参数配置</div>
                                                        </div>
                                                        <div class="table-step-arrow"></div>
                                                    </div>
                                                    <div class="table-step-item" id="table-step-item-2">
                                                        <div class="table-step-num">2</div>
                                                        <div class="table-step-cont">
                                                            <div class="table-step-tit">部署程序</div>
                                                        </div>
                                                        <div class="table-step-arrow "></div>
                                                    </div>
                                                    <div class="table-step-item" id="table-step-item-3">
                                                        <div class="table-step-num">3</div>
                                                        <div class="table-step-cont">
                                                            <div class="table-step-tit">智能合约授权</div>
                                                        </div>
                                                        <div class="table-step-arrow"></div>
                                                    </div>
                                                    <div class="table-step-item" id="table-step-item-4">
                                                        <div class="table-step-num">4</div>
                                                        <div class="table-step-cont">
                                                            <div class="table-step-tit">创建账号</div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="table-bs-set1-box step-container" id="step-container-1">
                                            <div class="table-bs-set1">
                                                <div class="table-bs-box set1 stepOne">
                                                    <div class="table-bs-box-container">
                                                        <div class="table-justify-grid mt-2n">
                                                            <div class="table-justify-grid-col"><h3 class="table-h3">站点信息</h3></div>
                                                        </div>
                                                        <div class="table-bs-form mt-2n mb-2n">
                                                            <div class="layui-form" lay-filter="formDemo">
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label must">站点名称</label>
                                                                    <div class="layui-input-block">
                                                                        <input type="text" name="siteName" lay-verify="required" autocomplete="off" placeholder="请输入名称" class="layui-input configurationValue" data-label="siteName">
                                                                    </div>
                                                                </div>
                                                                <div class="layui-form-item">
                                                                    <label class="layui-form-label must">联系方式</label>
                                                                    <div class="layui-input-block">
                                                                        <input type="text" name="contactInformation" lay-verify="required" autocomplete="off" placeholder="运控中心" class="layui-input configurationValue" data-label="contact">
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="table-justify-grid mt-2n">
                                                            <div class="table-justify-grid-col"><h3 class="table-h3">主机信息</h3></div>
                                                        </div>
                                                        <div class="table-bs-form mt-2n mb-2n">
                                                            <div class="layui-form">
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label must">主机IP</label>
                                                                        <div class="layui-input-block">
                                                                            <input type="text" name="hostIP" lay-verify="required" autocomplete="off" placeholder="请输入主机主机IP" class="layui-input configurationValue" data-label="hostIp">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label must">主机端口</label>
                                                                        <div class="layui-input-block">
                                                                            <input type="text" name="host" lay-verify="required" autocomplete="off" placeholder="请输入主机主机端口" class="layui-input configurationValue" data-label="hostPort">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label must">主机用户</label>
                                                                        <div class="layui-input-block">
                                                                            <input type="text" name="hostUser" lay-verify="required" autocomplete="off" placeholder="请输入主机用户" class="layui-input configurationValue" data-label="hostUser">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label must">主机密码</label>
                                                                        <div class="layui-input-block">
                                                                            <input type="text" name="hostPassword" lay-verify="required" autocomplete="off" placeholder="请验入主机密码" class="layui-input configurationValue" data-label="hostPassword">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label must">数据库用户名</label>
                                                                        <div class="layui-input-block">
                                                                            <input type="text" name="userName" lay-verify="required" autocomplete="off" placeholder="请输入用来访问的主机的密码" class="layui-input configurationValue" data-label="dbUserName">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label must">数据库密码</label>
                                                                        <div class="layui-input-block">
                                                                            <input type="text" name="password" lay-verify="required" autocomplete="off" placeholder="请输入用来访问的主机的密码" class="layui-input configurationValue" data-label="dbPassword">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label must">数据库端口</label>
                                                                        <div class="layui-input-block">
                                                                            <input type="text" name="databasePort" lay-verify="required" autocomplete="off" placeholder="请输入截据库端口" class="layui-input configurationValue" data-label="dbPort">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4 fr-col">
                                                                    <div class="layui-form-item">
                                                                        <div class="layui-input-block">
                                                                            <input type="radio" value="deployWayA" title="Docker部署" checked class="configurationValue radioChange" data-label="deployWayA" name="deployWay">
                                                                            <input type="radio"  value="deployWayB" title="原生部署" class="configurationValue radioChange" data-label="deployWayB" name="deployWay">
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="row">
                                                                    <div class="col-md-4">
                                                                        <div class="layui-form-item">
                                                                            <label class="layui-form-label must">应用服务端口</label>
                                                                            <div class="layui-input-block">
                                                                                <input type="text" name="applicationServicePort" lay-verify="required" autocomplete="off" placeholder="请输入应用服务端口" class="layui-input configurationValue" data-label="appPort">
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="row">
                                                                    <div class="col-md-4">
                                                                        <div class="layui-form-item">
                                                                            <label class="layui-form-label must">区块链</label>
                                                                            <div class="layui-input-block">
                                                                                <select class="configurationValue blockchainSelect" data-label="chain" lay_filter="blockchainSelect">
                                                                                </select>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label">组织</label>
                                                                        <div class="layui-input-block">
                                                                            <select  class="configurationValue organizationSelect" data-label="org" lay_filter="organizationSelect">
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label">节点</label>
                                                                        <div class="layui-input-block">
                                                                            <select  class="configurationValue nodeSelect" data-label="node" lay_filter="nodeSelect">
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-4">
                                                                    <div class="layui-form-item">
                                                                        <label class="layui-form-label">区块链账号</label>
                                                                        <div class="layui-input-block">
                                                                            <select  class="configurationValue blcokChainAccountSelect" data-label="chainAccount" lay_filter="blcokChainAccountSelect">
                                                                            </select>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="row">
                                                                    <div class="col-md-4">
                                                                        <div class="layui-form-item">
                                                                            <label class="layui-form-label">存证合约</label>
                                                                            <div class="layui-input-block">
                                                                                <select  class="configurationValue" data-label="evidence">
                                                                                    <option value=""></option>
                                                                                    <option value="0">账号：qwedd</option>
                                                                                    <option value="1">账号：admin</option>
                                                                                </select>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div class="col-md-4">
                                                                        <div class="layui-form-item">
                                                                            <label class="layui-form-label">共享合约</label>
                                                                            <div class="layui-input-block">
                                                                                <select class="configurationValue" data-label="share">
                                                                                    <option value=""></option>
                                                                                    <option value="0">账号：qwedd</option>
                                                                                    <option value="1">账号：admin</option>
                                                                                </select>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
    
                                                            </div>
                                                            <div class="set-up bs-last">
                                                                <ul>
                                                                    <li class="clearfix">
                                                                        <h4 class="table-h4" onclick="advancedSettingFun()">高级设置</h4>
                                                                        <div class="foldContent layui-form" style="display: none">
                                                                            <div class="col-md-4">
                                                                                <div class="layui-form-item">
                                                                                    <label class="layui-form-label must">日志输出级别</label>
                                                                                    <div class="layui-input-block">
                                                                                        <select name="logLevel" lay-filter="logLevel" class="configurationValue" data-label="logLevel">
                                                                                            <option value=""></option>
                                                                                            <option value="0">账号：qwedd</option>
                                                                                            <option value="1" selected="">一级</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-4">
                                                                                <div class="layui-form-item">
                                                                                    <label class="layui-form-label">是否使用国密</label>
                                                                                    <div class="layui-input-block">
                                                                                        <select name="isUseSM" lay-filter="isUseSM" class="configurationValue" data-label="isUseSM">
                                                                                            <option value=""></option>
                                                                                            <option value="0">否</option>
                                                                                            <option value="1" selected="">是</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                            <div class="col-md-4">
                                                                                <div class="layui-form-item">
                                                                                    <label class="layui-form-label">交易处理线程数量</label>
                                                                                    <div class="layui-input-block">
                                                                                        <select name="threadSum" lay-filter="threadSum" class="configurationValue" data-label="threadSum">
                                                                                            <option value=""></option>
                                                                                            <option value="0">0</option>
                                                                                            <option value="1" selected="">10</option>
                                                                                            <option value="1">20</option>
                                                                                        </select>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
    
                                                                        </div>
                                                                    </li>
                                                                </ul>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="table-bs-box table-add">
                                                </div>
                                            </div>
                                            <a href="javascript:;" class="add top-tit-btn" onclick="addNewSiteFun()">添加站点</a>

                                        </div>
                                        <div class="table-bs-set2 step-container none" id="step-container-2">
                                            <h5>程序部署日志</h5>
                                            <p></p>
                                        </div>
                                        <div class="table-bs-set3-box step-container none" id="step-container-3">
                                            <!-- 循环出的值 -->
                                           <div class="step3-mainContainer">
                                                <div class="table-bs-box table-bs-set3">
                                                    <div class="table-justify-grid mt-2n">
                                                        <div class="table-justify-grid-col"><h3 class="table-h4">运控中心</h3></div>
                                                    </div>
                                                    <div class="table-justify-grid mt-2n">
                                                        <div class="table-justify-grid-col"><h3 class="table-h3">存证业务</h3></div>
                                                    </div>
                                                    <div class="table-bs-form mt-2n mb-2n">
                                                        <div class="layui-form">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label must">合约名称</label>
                                                                <div class="layui-input-block">
                                                                    <!-- <select name="evidence"  disabled class="stepThree-form" data-belong="存证合约名称">
                                                                        <option value="evidence"></option>
                                                                    </select> -->
                                                                    <input type="text" name="evidence" disabled   class="layui-input stepThree-form" data-belong="存证合约名称">
                                                                </div>
                                                            </div>
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label must">授权账号</label>
                                                                <div class="layui-input-block">
                                                                    <!-- <select name="chainAccount"  disabled  class="stepThree-form" data-belong="授权账号">
                                                                        <option value="chainAccount"></option>
                                                                    </select> -->
                                                                    <input type="text" name="chainAccount" disabled   class="layui-input stepThree-form" data-belong="授权账号">
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="table-justify-grid mt-2n">
                                                        <div class="table-justify-grid-col"><h3 class="table-h3">共享业务</h3></div>
                                                    </div>
                                                    <div class="table-bs-form mt-2n mb-2n">
                                                        <div class="layui-form">
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label must">合约名称</label>
                                                                <div class="layui-input-block">
                                                                    <!-- <select name="share" disabled class="stepThree-form"  data-belong="共享合约名称">
                                                                        <option value="share"></option>
                                                                    </select> -->
                                                                    <input type="text" name="share" disabled   class="layui-input stepThree-form" data-belong="共享合约名称">
                                                                </div>
                                                            </div>
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label must">发送账号</label>
                                                                <div class="layui-input-block">
                                                                    <!-- <select name="sendCount" disabled class="stepThree-form"  data-belong="发送账号">
                                                                        <option value="sendCount"></option>
                                                                    </select> -->
                                                                    <input type="text" name="sendCount" disabled   class="layui-input stepThree-form" data-belong="发送账号">
                                                                </div>
                                                            </div>
                                                            <div class="layui-form-item">
                                                                <label class="layui-form-label must">授权类型</label>
                                                                <div class="layui-input-block select-account-container">
                                                                    <select name="account-type"  class="stepThree-form select-account"  data-belong="授权类型">
                                                                        <option value="">请选择授权类型</option>
                                                                        <option value="1">运控</option>
                                                                        <option value="2">信关</option>
                                                                        <option value="0">取消授权</option>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="table-bs-set3-line"></div>
                                                </div>
                                           </div>
                                        </div>
                                        <div class="table-bs-set4 table-bs-box table-bs-bodybox none step-container" id="step-container-4">
                                            <div class="table-justify-grid mt-2n">
                                                <div class="table-justify-grid-col">
                                                    <button class="top-tit-btn addbtn" onclick="addAccountFun(this)">添加账号</button>
                                                </div>
                                            </div>
                                            <div class="table-bs-set4 mt-2n mb-2n">
                                                <div class="col-md-3 center">
                                                    站点名称
                                                </div>
                                                <div class="col-md-3 center">
                                                    角色
                                                </div>
                                                <div class="col-md-3 center">
                                                    账号
                                                </div>
                                                <div class="col-md-3 center">
                                                    密码
                                                </div>
                                            </div>
                                            <div class="table-bs-set4-box four-step-container">
                                                <div class="four-step-main-container">
                                                    <div class="table-bs-set4  mt-2n mb-2n layui-form">
                                                        <div class="col-md-3">
                                                            <div class="layui-input-block">
                                                                <select name="fourName" lay-filter="fourName" class="fourStepForm" data-belong="站点名称">
                                                                    <option value=""></option>
                                                                    <option value="0">共享合约</option>
                                                                    <option value="1" selected>运控中心</option>
                                                                    <option value="2">共享合约</option>
                                                                    <option value="3">共享合约</option>
                                                                    <option value="4">共享合约</option>
                                                                </select>
                                                            </div>
                                                        </div>
                                                        <div class="col-md-3">
                                                            <select name="fourRole" lay-filter="fourRole" class="fourStepForm" data-belong="角色">
                                                                <option value=""></option>
                                                                <option value="0">共享合约</option>
                                                                <option value="1" selected>超级管理员</option>
                                                                <option value="2">共享合约</option>
                                                                <option value="3">共享合约</option>
                                                                <option value="4">共享合约</option>
                                                            </select>
                                                        </div>
                                                        <div class="col-md-3">
                                                            <input type="text" name="fourAccountNumber" lay-verify="required" autocomplete="off" placeholder="请输入账号" class="layui-input fourStepForm" data-belong="账号">
                                                        </div>
                                                        <div class="col-md-3">
                                                            <input type="text" name="fourPassword" lay-verify="required" autocomplete="off" placeholder="请输入密码" class="layui-input fourStepForm" data-belong="密码">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <!-- <div class="table-bs-set4-add">

                                            </div> -->
                                        </div>
                                        <div class="table-btn-box layui-form-item">
                                            <a href="javascript:;" class="top-tit-btn back none" id="top-tit-btn-1" onclick="prevBtnFun(this)">上一步</a>
                                            <a href="javascript:;" class="top-tit-btn none" id="top-tit-btn-2" onclick="nextBtnFun(this)">下一步</a>
                                            <a href="javascript:;" class="top-tit-btn none" id="top-tit-btn-3" onclick="finishBtnFun()">完成</a>
                                            <a href="javascript:;" class="top-tit-btn layui-btn layui-btn" id="top-tit-btn-4" lay-submit lay-filter="formSubmit" onclick="startDeploymentFun()">开始部署</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
        </section>
    </section>
</div>
<script src="../../../../../lib/jquery/jquery.min.js"></script>
<script src="../../../../../lib/bootstrap/js/bootstrap.min.js"></script>
<script src="../../../../../lib/ui/js/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="../../../../../content/pc/sysmgt/unitmanage/layui/layui.js"></script>
<script src="../../../../../content/pc/sysmgt/unitmanage/js/jquery.min.js"></script>
<script>
    let firstRadioValue='';
    let radioChooseArr=[];
    function prevBtnFun(dom){
        let thisDom=$(".step-container:not(.none)");
        let thisId=$(thisDom).attr('id');
        let thisIndex=thisId.substring(thisId.lastIndexOf('-')+1,thisId.length);
        if(!$(dom).hasClass('layui-btn-disabled')){
            if(thisIndex==2){
            }else if(thisIndex==3){
            }else if(thisIndex==4){
            }
        }
    }
    function nextBtnFun(dom){
        let thisDom=$(".step-container:not(.none)");
        let thisId=$(thisDom).attr('id');
        let thisIndex=thisId.substring(thisId.lastIndexOf('-')+1,thisId.length);
        if(!$(dom).hasClass('layui-btn-disabled')){
            if(thisIndex==2){
                commonSwitchFun(2);
                let arrList=[];
                let arrLenth=arrList.length-1;
                for(let i=0;i<arrLenth;i++){
                    let html=$('.step3-mainContainer').html();
                    $('#step-container-3').append(html);
                }
                $('.select-account').each((index, element)=>{
                    let nameText="account-type-"+index;
                    $(element).attr('name',nameText);
                });
                layui.use('form', function(){
                    var form = layui.form;
                    form.val('', {
                        'account-type': '2' 
                    });
                });
                $('.table-bs-set3').each((index, element)=>{
                    let valueDoms=$(element).find('.stepThree-form');
                    $(valueDoms).each((indexSon,elementSon)=>{
                        let dataBelong=$(elementSon).attr('data-belong');
                        if(dataBelong=='存证合约名称'){
                            $(elementSon).val(arrList[index].evidence);
                        }else if(dataBelong=='授权账号'){
                            $(elementSon).val(arrList[index].chainAccount);
                        }else if(dataBelong=='共享合约名称'){
                            $(elementSon).val(arrList[index].share);
                        }else if(dataBelong=='发送账号'){
                            $(elementSon).val(arrList[index].sendCount);
                        }else if(dataBelong=='授权类型'){
                            $(elementSon).val(arrList[index].accountType);
                        }
                        layui.form.render('select');
                    });
                });
            }else if(thisIndex==3){
                let accountArr=[];
                $('.table-bs-set3 .select-account').each((index,element)=>{
                    accountArr.push($(element).val());
                });
            }
        }
    }
     function finishBtnFun(){
        let arrList=[];
        let showMsg=false;
        $('.four-step-container .table-bs-set4').each((index, element)=>{
            let sonDom=$(element).find('.fourStepForm');
            sonDom.each((indexSon,elementSon)=>{
                if($(elementSon).attr('data-belong')=='站点名称'){
                    arrList[index]['name']=$(elementSon).val();
                }else if($(elementSon).attr('data-belong')=='角色'){
                    arrList[index]['role']=$(elementSon).val();
                }else if($(elementSon).attr('data-belong')=='账号'){
                    arrList[index]['account']=$(elementSon).val();
                }else if($(elementSon).attr('data-belong')=='密码'){
                    arrList[index]['password']=$(elementSon).val();
                }
                if($(elementSon).val()==''){
                    showMsg=true;
                    return
                }
            });
        });
    }
    function addNewSiteFun(){
        var html = $('.set1').html();
        $(".table-add").append(html);
        $('.table-bs-box-container').each((index, element)=>{
            let radioChangeDoms=$(element).find('.radioChange');
            $($(radioChangeDoms)[0]).attr('name',"deployWay"+index);
            $($(radioChangeDoms)[1]).attr('name',"deployWay"+index);
        });
        let firstContainer=$('.table-bs-box-container')[0];
        let firstRadios=$(firstContainer).find('.radioChange');
        layui.use('form', function(){
            var form = layui.form;
            form.render();
            if(firstRadioValue.indexOf('A')>-1){
                $($(firstRadios)[0]).prop('checked', true);
            }else if(firstRadioValue.indexOf('B')>-1){
                $($(firstRadios)[1]).prop('checked', true);
            }
        });
    }
    function advancedSettingFun(){
        var li = $(this).parent();
        if (li.hasClass("fold")) {
            $('.foldContent').slideUp();
        } else {
            $('.foldContent').slideDown();
        }
    }
    function loadFormFun(){
        layui.use('form', function () {
            var form = layui.form;
            form.render(null,'startForm');
            form.on('radio', function(data){
                if($(data.elem).attr('name')=='deployWay'){
                    firstRadioValue=data.value;
                    radioChooseArr[0]=data.value;
                }else{
                    let nowDomName=$(data.elem).attr('name');
                    let thisNowIndex=nowDomName.substring(nowDomName.lastIndexOf('y')+1,nowDomName.length);
                    radioChooseArr[thisNowIndex]=data.value;
                }
            });
        });
    }
    function startDeploymentFun(){
        let arrList=[];
        let showMsg=false;
        $('.table-bs-box-container').each((index, element)=>{
            let arrObj={};
            arrList.push(arrObj);
            let valuesDomArr=$(element).find('.configurationValue');
            let radioDomArr=$(element).find('.radioChange');
            valuesDomArr.each((indexSon,elementSon)=>{
                arrObj[$(elementSon).attr('data-label')]=$(elementSon).val();
                if($(elementSon).val()==''){
                    showMsg=true;
                    return 
                }
            });
            arrObj['deployWay']=radioChooseArr[index];
        });
            let dataList=[];
            dataList.forEach((item,index)=>{
                $('.table-step-item').removeClass('is-current');
                $('#table-step-item-2').addClass('is-current');
                $('.step-container').addClass('none');
                $("#step-container-2").removeClass('none');
            });
    }
    function addAccountFun(dom){
        var html = $('.four-step-main-container').html();
        $(".four-step-container").append(html);
        layui.use('form', function () {
            var form = layui.form;
            form.render();
        });
    }
    function loadSelectDataListFun(){
        layui.use('form', function(){
            var form = layui.form;
            form.render();
            layui.form.render('select');
            loadBlockChainFun();
            form.on('select(blockchainSelect)', function(data){
            });
            form.on('select(organizationSelect)', function(data){
            });
            form.on('select(nodeSelect)', function(data){
                let thisValue=data.value
            });
            form.on('select(blcokChainAccountSelect)', function(data){
                let thisValue=data.value
            });
            layui.form.render('select');
        });
    }
    function loadBlockChainFun(){
        let arrList=[];
        let html="";
        arrList.forEach((item,index)=>{
            html+="<option value='"+item['chain_id']+"'>"+item['chain_name']+"</option>";
        });
        $('.blockchainSelect').append(html);
    }
    function loadOrganizationListFun(chainId){
        $('.organizationSelect').empty();
        let chainIdList=[];
        let html="";
        chainIdList.forEach((item,index)=>{
            html+="<option value='"+item['org_id']+"'>"+item['org_name']+"</option>";
        });
        $('.organizationSelect').append(html);
    }
    function loadNodeSelectFun(chainId,orgId){
        $('.nodeSelect').empty();
        let chainIdList=[];
        let html="";
        chainIdList.forEach((item,index)=>{
            html+="<option value='"+item['node_id']+"'>"+item['node_name']+"</option>";
        });
        $('.nodeSelect').append(html);
    }
    function loadBlockchainAccountFun(orgId){
         $('.blcokChainAccountSelect').empty();
        let chainIdList=[];
        let html="";
        chainIdList.forEach((item,index)=>{
            html+="<option value='"+item['orguser']+"'>"+item['orguser']+"</option>";
        });
        $('.blcokChainAccountSelect').append(html);
    }
    $(function () {
        loadFormFun();
        loadSelectDataListFun();

    });
</script>
</body>
</html>
